<template>
	<view>
		<u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" v-if="userInfoCentShopList.length==0"
			text="没有绑定的店铺信息">
		</u-empty>
		<block v-for="(item,k) in userInfoCentShopList" :key="k">
			<view class="bg-white u-m-t-20 u-p-l-32 u-p-r-32 u-p-t-20 u-p-b-20 solid-bottom" 
			@click="$u.route('/pages/personal/service/companycancelbangding',{centShopId:item.centShopId,companyName:item.name,lianxiName:item.lianxiName,lianxiPhone:item.lianxiPhone})">
				<view class="flex u-col-center u-row-between">
					<view class="time">{{item.name}}</view>
					<view class="jl" style="color: #009900;">余额:¥ {{parseFloat(item.balance).toFixed(2)}}</view>
				</view>
				<view class="flex u-col-center u-row-between u-m-t-10">
					<view class="jl">店铺编号: {{item.centShopId}}</view>
					<view class="jl">绑定时间: {{item.createTime}}</view>
				</view>
			</view>
		</block>
		<view style="height: 100rpx;"></view>
		<view class="u-m-l-20 u-m-r-20 footer">
			<u-button @click="$u.route('/pages/personal/service/companybangding')" type="primary" shape="circle"
				color="#81D8CF" text="绑定店铺"></u-button>
		</view>

	</view>
</template>

<script>
	import {
		getUserInfoCentShopList

	} from '@/common/api/api.js'
	export default {
		data() {
			return {
				userInfoCentShopList: [],
				show: false,
				userInfoId: '',
			}
		},
		onLoad(options) {
			// this.userInfoId = this.$store.state.$token;
			// this.getUserInfoCentShopList();
		},
		onShow() {
			this.userInfoId = this.$store.state.$token;
			this.getUserInfoCentShopList();
		},
		methods: {
			getUserInfoCentShopList() {
				getUserInfoCentShopList({
					userInfoId: this.userInfoId
				}).then(res => {
					this.userInfoCentShopList = res.data.list;
				})
			},

		}
	}
</script>

<style>
	.time {
		font-size: 32rpx;
		font-weight: 600;
		color: #000;
	}

	.jl {
		color: #999;
		font-size: 26rpx;
	}

	.name {
		color: #000;
	}

	.price {
		font-size: 32rpx;
		color: #000;
		font-weight: 600;
	}

	.datetime {
		color: #b1b1b1;
		margin-top: 10rpx;
	}

	.btn {
		background-color: #81D8CF;
		width: 100rpx;
		height: 40rpx;
		line-height: 40rpx;
		text-align: center;
		font-size: 24rpx;
		border-radius: 4rpx;
		color: #fff;
		font-weight: 400;
	}

	.comfirm-css {
		background-color: #81D8CF;
		color: #fff;
		width: 96%;
		height: 80rpx;
		line-height: 80rpx;
		font-size: 30rpx;
		margin: 0 auto;
		margin-top: 100rpx;
		text-align: center;
		border-radius: 100rpx;
		border: none;
	}
</style>